/**
 * demo.cpp
 *
 *  Created on: 2013.4.18/2013.11.30
 *      Author:
 * Description:
 */

#include "cgi.h"

using namespace cppcgi;

int main(int argc, char **argv)
{
    //InitCppCgi();
    Head();
    Test::Alert($_SERVER);
    /*
    FILE *ptr = NULL;
    char buff[512];
    string ipaddr = $_SERVER["REMOTE_ADDR"];
    string command = "/sbin/arp -a" + (ipaddr.empty() ? "" : "|grep " + ipaddr) + "|awk '{print $4}'";
    KvVector result;
    if ((ptr = popen(command.c_str(), "r")) != NULL)
    {
        while (fgets(buff, 512, ptr) != NULL)
        {
            string mac = string(buff);
            result.Insert("", Trim(mac));
        }
    }
    if (NULL != ptr)
    {
        pclose(ptr);
        ptr = NULL;
    }

    CGICS << "REMOTE_MAC=>" << result[0] << CGICE;
    */
    return 0;
}
